package TestCases;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import org.openqa.selenium.support.PageFactory;


import org.openqa.selenium.support.ui.Select;

import PageOR.*;

public class TC1 extends SetUp
{ 
	public TC1()
	{
		System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.Jdk14Logger");
	}

	@Test(priority=1)
	public void firstTC()
	{
		driver.get("http://newtours.demoaut.com/");
		objWelcomeMercuryPage.func_Login("mercury", "mercury");
		objFindFlightPage.func_EnterFlightDEtails("One Way",1, "London", "November", 1, "Paris", "November", 15, "Business class", "No Preference");
		objSelectAFlightPage.func_FindFlights();
		objBookAFlightPage.func_BookFlight("Rohit","LastName","Visa","456789781234","08","2008","733 naamans rd","claymont","CA","UNITED STATES");
		objFlightConfirmationPage.func_GetTicketConfirmationNumber();
		objFlightConfirmationPage.func_LogOut();
	}
	
	//@Test(priority=1)
	public void SecoundTC()
	{
		driver.get("http://newtours.demoaut.com/");
		objWelcomeMercuryPage.func_Login("mercury", "mercury");
		objFindFlightPage.func_EnterFlightDEtails("One Way",1, "London", "November", 1, "Paris", "November", 15, "Business class", "No Preference");
		objSelectAFlightPage.func_FindFlights();
		objBookAFlightPage.func_BookFlight("Rohit","LastName","Visa","456789781234","08","2008","733 naamans rd","claymont","CA","UNITED STATES");
		objFlightConfirmationPage.func_GetTicketConfirmationNumber();
		objFlightConfirmationPage.func_LogOut();
	}
}